<?php

class spHeading extends spElement
{
	public function __construct( $data=null )
	{
		parent::__construct( "h1", $data );
		
		if ( isset($data["level"]) )
			$this->setLevel( $data["level"] );
	}

	public function setLevel( $level )
	{
		switch ( $level )
		{
			case 1: parent::setTag( "h1" ); break;
			case 2: parent::setTag( "h2" ); break;
			case 3: parent::setTag( "h3" ); break;
			case 4: parent::setTag( "h4" ); break;
			case 5: parent::setTag( "h5" ); break;
			case 6: parent::setTag( "h6" ); break;
		}
	}
}

?>